home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacHack 1997
/
MacHack 1997.toast
/
Hacks
/
Hacks ’95
/
Hex Abacus
/
Abacus.make
< prev
next >
Wrap
Text File
|
1995-06-24
|
5KB
|
100 lines
# File: Abacus.make
# Target: Abacus
# Sources: Abacus.c Abacus.Def Objects.Def
# Created: Tuesday, April 11, 1995 9:16:36 PM
OBJECTS = {mdTarget:}Abacus.c.o
defFiles = Abacus.Def
importedDefFiles =
instanceFiles = Objects.Def
tsFiles =
htsFiles =
##### General Magic Directory/File Defines/Options #####
thePackage = Abacus
theRAMCard = AbacusRC
OMOpts = {MagicDebugOpts} {OMMagicTarget} {ExtraOMOptions} {MagicInterfaces}Indexicals.h -read {OMDumpfile} -i :
OMRAMOpts = -equates {thePackage} {mdTarget:}
ramCardPackage = AbacusRAM
InterfaceDir = {mdTarget:}Interfaces:
ChangeFile = {mdTarget:}ChangedClassOrOp
ImportsIncludesFile = {InterfaceDir}PackageImports.h
GendCInterfaceFiles = {InterfaceDir}PackageClassNumbers.h {InterfaceDir}PackageFieldNumbers.h {InterfaceDir}PackageFields.h {InterfaceDir}PackageOperationNumbers.h {InterfaceDir}PackageOperations.h
GendAInterfaceFiles = {InterfaceDir}PackageClassNumbers.Equ.a {InterfaceDir}PackageFieldNumbers.Equ.a {InterfaceDir}PackageFields.Equ.a {InterfaceDir}PackageOperationNumbers.Equ.a {InterfaceDir}PackageOperations.Equ.a
COptions= {MagicCOptions} {MagicDump} {MagicCDebugOpts} {MagicTarget} -i {MagicTargInterfaces} -i {MagicInterfaces} -i "{mdTarget:}"Interfaces: `Catenate Build.Directories ≥ dev:null || Set Status 0`
##### Default Rules #####
.c.o ƒ .c
{C} {DepDir}{Default}.c -o {Targ} {COptions} {ExtraCOptions}
##### Directory dependencies #####
{mdTarget:} ƒ : {mdTarget:}
{mdTarget:}Code ƒ {objects} {thePackage}.make
{Link} -xm gm -fastlink on -dead off -o {mdTarget:}Code -Sym on -c gm01 -t CLUS -mapgm {mdTarget:}Code.Map {objects} {ExtraLinkOptions}
##### General Magic ObjectMaker Dumpfile Dependencies #####
"{OMDumpfile}" ƒ "{MagicDevTools}"ObjectMaker # if ObjectMaker changes, regenerate interfaces
Execute BuildPreCompileIfNeeded
##### General Magic ObjectMaker Dependencies #####
{GendCInterfaceFiles} ∂
{GendAInterfaceFiles} ∂
ƒ {ChangeFile}
{objects} ƒ ∂
{GendCInterfaceFiles} ∂
{GendAInterfaceFiles} ∂
{ImportsIncludesFile}
{ImportsIncludesFile} ƒ {importedDefFiles} {thePackage}.make
Echo > {ImportsIncludesFile}
For iDefFile In {importedDefFiles} ;∂
If {iDefFile} =~ /(≈:)*(≈)®1Public.Def/ ;∂
Set importedPackageName "{®1}" ;∂
NewFolder {InterfaceDir}temp || Set Status 0 ;∂
ObjectMaker {OMOpts} {iDefFile} -headers {InterfaceDir}temp: -i "{MagicDevDefFiles}" ;∂
Delete -i {InterfaceDir}temp:TempImports.h || Set Status 0 ;∂
Catenate {InterfaceDir}temp:≈.h > {InterfaceDir}temp:TempImports.h ;∂
StreamEdit -e "/__Package_/ Replace /__Package_/ ∂"__{importedPackageName}_∂"" "{InterfaceDir}temp:TempImports.h" > "{InterfaceDir}{importedPackageName}Imports.h" || Set Status 0 ;∂
Echo "∂#include ∂"{importedPackageName}Imports.h∂"" >> {ImportsIncludesFile} ;∂
Delete -y "{InterfaceDir}temp:" || Set Status 0 ;∂
End ;∂
End
{ChangeFile} ƒ {defFiles} {thePackage}.make
Date > {ChangeFile}.New
ObjectMaker {OMOpts} {defFiles} {tsFiles} -templates {mdTarget:}Templates.r.New -headers {InterfaceDir} -i "{MagicDevDefFiles}"
Rename -y {mdTarget:}Templates.r.New Templates.r
MagicBuildDebugging {thePackage} {mdTarget:} {InterfaceDir} || (Echo "### Failure building Debugging information∂n")
Rename -y {ChangeFile}.New {ChangeFile}
##### General Magic Main Build Rules #####
{thePackage} ƒ "{OMDumpfile}" {ChangeFile} {mdTarget:}Code {defFiles} {tsFiles} {instanceFiles} {thePackage}.make
ObjectMaker {OMOpts} {defFiles} {tsFiles} {instanceFiles} -o {mdTarget:}{thePackage} -code {mdTarget:}Code
Move -y {mdTarget:}{thePackage} {Targ}
MagicDeleteChanges
Duplicate -y {Targ} "{MagicDevSystem}"
If "{MagicAutoRun}" == 1; MagicRunPackage {thePackage}; End
##### General Magic RamCard Build Rules #####
{ramCardPackage} ƒ "{OMDumpfile}" {ChangeFile} {mdTarget:}Code {defFiles} {tsFiles} {instanceFiles} {thePackage}.make
ObjectMaker {OMOpts} {OMRAMOpts} {defFiles} {tsFiles} {instanceFiles} -o {ramCardPackage} -code {mdTarget:}Code
Catenate {mdTarget:}ClusterEquates {mdTarget:}RoutineEquates > {mdTarget:}SavedEquates
{theRamCard} ƒ {ramCardPackage}
delete -i {mdTarget:}{theRamCard}.Def ∑ dev:null
Echo "Package " {thePackage} ∂"{ramCardPackage}∂"∂; >> {mdTarget:}{theRamCard}.Def
ObjectMaker -uniqueID {CardTypeOptions} -rom={CardBase} {OMOpts} {OMRAMOpts} {mdTarget:}{theRamCard}.Def -o {mdTarget:}{theRamCard}
Move -y {mdTarget:}{theRAMCard} {Targ}
MagicCreateEquates {thePackage}
Duplicate -y {mdTarget:}Code.Sym "{MagicTelebugFolder}{theRAMCard}.Sym"
Echo "∂nsource on∂nuse ∂"{thePackage}RC.SYM∂"∂nautosource on∂nsourcepath `Directory`" > "{MagicTelebugFolder}Telebug UserStartup"
If "{MagicAutoRun}" == 1; MagicSendRAMCard {thePackage}; End